Material UI
Material Design準拠のReact向けUI Framework
GitHub.iconmui-org/material-ui: React components for faster and easier web development. Build your own design system, or start with Material Design.
Web site サイト.iconMaterial-UI: A popular React UI framework
強み
IE11対応
色等変えたい
code:thema.js
import { createMuiTheme } from '@material-ui/core/styles'
const theme = createMuiTheme({
typography: {
useNextVariants: true,
},
palette: {
primary: {
light: '#5c67a3',
main: '#3f4771',
dark: '#2e355b',
contrastText: '#fff',
},
secondary: {
light: '#ff79b0',
main: '#ff4081',
dark: '#c60055',
contrastText: '#000',
}
}
})
導入
code:App.js
import React from 'react'
import MainRouter from './MainRouter'
import {BrowserRouter} from 'react-router-dom'
import { ThemeProvider } from '@material-ui/styles'
import theme from './theme'
const App = () => {
return (
<BrowserRouter>
//挟む
<ThemeProvider theme={theme}>
<MainRouter/>
</ThemeProvider>
</BrowserRouter>
)}